/**
 * ===========================================================================
 * 版权所有 湖南免了么网络科技有限公司，并保留所有权利。
 * 网站地址: http://www.mianle.me
 * ===========================================================================
 * 16:39 2018/6/26
 */
package com.mianle.userapi.service.task05;

import com.mianle.userapi.mapper.GaodeMapper;
import com.mianle.userapi.model.Gaode;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Author: yiyuan
 * @Description:
 * @Date: Created in 16:39 2018/6/26
 *
 */
@Service
public class GaoServer {

    @Autowired
    private GaodeMapper gaodeMapper;

    @Transactional(rollbackFor = Exception.class)
    public int save (String s) {
        Gaode gao = new Gaode();
        gao.setLatitude(65.5656);
        gao.setLongitude(89.25656);
        int r = gaodeMapper.save(gao);
        if(r > 0) {
            //s.substring(0, 10);
        }
        return r;
    }
}
